The present invention relates to the field of signal processing, and in particular to apparatus and method for determining the energy of a signal.
An ideal exponentially weighted root mean square (ERMS) detector for determining the energy of an analog signal s(u) is well known from the theory of electrical signal processing. The energy may be determined sequentially by executing three method steps: squaring the signal, integrating the squared signal, and extracting the root of the integrated signal. These method steps are also reflected in the following equation:       y    ⁢          (                        s          ⁢                      (            u            )                          ,        t            )        =                    1        T            ⁢                        ∫                      -            ∞                    t                ⁢                                                            s                2                            ⁢                              (                u                )                                      ·                          ⅇ                              -                                                      (                                          t                      -                      u                                        )                                    T                                                              ⁢                      xe2x80x83                    ⁢                      ⅆ            u                              
which describes the functional principle of the ideal analog detector. The detector determines the energy y of the signal s(u) as its RMS value, weighted exponentially with a time constant T, as a function of time t.
The conventional digital ERMS detectors receive a digital signal sn at their input in order to deliver a digital energy signal yn from the output, with the amplitude values of the energy signal representing the energy of the signal sn. They are based on method steps known from theory. To convert these method steps, as a rule as shown in FIG. 4a, they are formed as a series circuit consisting of a squaring element 1, a low-pass filter 2, and a root extractor 3.
FIG. 4b shows one possible digital implementation for such a series circuit. Accordingly, squaring element 1 is formed from a first multiplying element 410 that multiplies the digital signal sn by itself in order to provide the squared signal s2n and its output. The squared signal is then supplied as the input signal to the digital low-pass 2 weighted with a factor tau.
Within the low-pass 2, the input signal is fed as a first summand to an adding element 420 which delivers at its output the desired energy signal but squared as y2n. As the second summand, the output signal y2n fed back through a state memory 430 weighted with the factor (1xe2x88x92tau) is supplied to adding element 420.
Then the squared energy signal y2n is subjected to a root extractor 3. The root extractor 3 comprises a second adding element 440 that receives the squared energy signal y2n and outputs the desired energy signal yn at its output. To calculate the energy signal yn, adding element 440 adds the squared energy signal to two additional signals. These are firstly the energy signal y2nxe2x88x921 fed back through a second state memory 450 from its own output and secondly a signal y2nxe2x88x921 that is obtained by squaring and negating from the fed-back energy signal ynxe2x88x921.
The conventional calculation of the energy signal yn shown here suffers from the following disadvantages:
By squaring the signal sn, its dynamic range is sharply increased. It is only possible to store the squared signal in a memory with a very large word width.
The square root routines used in conventional extraction of square roots converge slowly, often as a function of the magnitude of the amplitude of their input signal. They are therefore unsuitable for use in systems that require rapid convergence behavior of the detector, such as compander-expander systems for example.
An objective of the invention is to improve the methods and devices according to the species for determining the energy of a signal in such fashion that they exhibit faster convergence behavior and reduced computation cost, as well as less storage space.
According to a first embodiment of the method according to the invention, an energy signal yn is calculated whose amplitude values represent the energy of signal sn, according to the equation                               y          n                =                              (                                          tau                *                                  s                  n                  2                                                            2                *                                  y                                      n                    -                    1                                                                        )                    +                      (                                          (                                  1                  -                                      tau                    2                                                  )                            *                              y                                  n                  -                  1                                                      )                                              (        1        )            
with
tau: a specified parameter and
n: the clock pulse, whereby in Equation 1 the method steps of squaring, low-pass filtration, and root extraction are combined.
The parameter tau determines the time constant for the exponential weighting. It bears the following relationship approximately with the time constant T in the analog formula:   tau  =      "LeftBracketingBar"                            (          0.5          )                *                  (                      1            -                          ⅇ                              (                                  ⅈ                                      T                    *                    fs                                                  )                                              )                            (                  0.5          -                      ⅇ                          (                              ⅈ                                  T                  *                  fs                                            )                                      )              "RightBracketingBar"  
where:
i=sqrt(xe2x88x921)
fs=sampling frequency of the digital system.
Example
with fs 48 kHz and T=20 ms, tau is approximately 0.00104.
The explanations of the parameters tau and n likewise apply to all the following equations in the specification.
In the method performed according to Equation 1, the integrated method step of extracting the root exhibits a quadratic convergence behavior which has a very advantageous effect on the dynamic behavior of the entire process.
In addition, the method step of root extraction in the step of low-pass filtration is integrated, so that the calculation expense is reduced.
To work the method, it is no longer necessary to store the squared signal s2n with its large dynamic range; instead, it is sufficient to store the amplitude values found for the energy signal yn, which, because of the fact that the root has been extracted, exhibit a value range considerably reduced by comparison with the dynamic range of the squared signal s2n. For this reason, in the method according to the invention, a memory with a relatively small word width can be used.
According to one advantageous improvement on the method, the calculation of the first summand in Equation 1 includes the step xe2x80x9cmultiply signal sn by an auxiliary signal tau/2ynxe2x88x921 to obtain a product signalxe2x80x9d and xe2x80x9cmultiply the product signal by the signal snxe2x80x9d or alternatively the steps xe2x80x9csquare the signal snxe2x80x9d and xe2x80x9cmultiply the squared signal s2n by the auxiliary signal tau/2ynxe2x88x921xe2x80x9d. Depending on the selected implementation of the method, one alternative or the other can contribute to reducing the computation and storage cost.
The advantages given for the first embodiment of the method according to the invention apply similarly to a corresponding device.
It is advantageous for the corresponding device according to the invention to have an inverter to receive the energy signal yn and to output an inverted signal bn=tau/2yn, designed so that it, by the equation                               b          n                =                              b                          n              -              1                                *                                    2              ⁢              k                        tau                    *                      (                                          (                                                                            (                                              1                        +                        k                                            )                                        *                    tau                                                        2                    ⁢                    k                                                  )                            -                              (                                                      b                                          n                      -                      1                                                        *                                      y                    n                                                  )                                      )                                              (        2        )            
with
k: a constant preferably between 0.5 and 1, it provides the specified link between the inverted signal bn and the energy signal yn. The convergence behavior of the inverter can be influenced by the choice of the constant k; in this manner, the quadratic convergence behavior of the entire device can be optimized as well.
The explanation for the constant k likewise applies to all the following equations in the specification.
According to a second embodiment of the method according to the invention, the goal is achieved especially by virtue of the fact that the energy signal yn is calculated according to the equation                               y          n                =                              (                                          tau                *                                  s                  n                  2                                                            2                *                                  y                                      n                    -                    1                                                                        )                    +                      (                                          (                                  1                  -                                      tau                    2                                                  )                            *                              y                                  n                  -                  1                                                      )                                              (        3        )            
with the method steps of squaring, low-pass filtering, and root extraction being combined in Equation 3.
In the method performed according to Equation 3, the method step of root extraction exhibits a quadratic convergence behavior, which has a highly advantageous effect on the dynamic behavior of the entire method.
In addition, the method step of low-pass filtration is integrated in the step of root extraction, so that calculation cost is reduced.
To work the method, it is no longer necessary to store the squared signal s2n with its wide dynamic range; instead, it is sufficient to store the currently determined value for the energy signal yn, which, because of the root extraction that has been performed, has a value range that is considerably reduced by comparison with the dynamic range of the squared signal s2n. For this reason, in the method according to the invention, a memory with a much reduced word width can be used.
The listed advantages of the second embodiment of the method according to the invention also apply to a corresponding device.
For the device according to the second embodiment, it is likewise advantageous for the reasons given for it to have the inverter described above.